<?
include("common/header.html");
include("common/left.html");
include("common/page.php");
$pageSize=$_REQUEST['pageSize']?$_REQUEST["pageSize"]:20;
$currentPage=$_REQUEST["currentPage"]?$_REQUEST["currentPage"]:1;
$offset=($currentPage-1)*$pageSize;
$where="where r.sid=".$_SESSION['sid'];
if($btime=mysql_real_escape_string($_REQUEST['btime'])){
	$where.=" and r.rectime>='$btime 00:00:00'";
}
if($etime=mysql_real_escape_string($_REQUEST['etime'])){
	$where.=" and r.rectime<='$etime 23:59:59'";
}
if($dname=mysql_real_escape_string($_REQUEST['dname'])){
	$where.=" and m.dname like '%".$dname."%'";
}
$r=array();
$str="select m.dname,r.* from pft_d_operation_rec r left join pft_member m on r.fid=m.id $where order by rectime desc limit $offset,$pageSize";
$GLOBALS['le']->query($str);
if($_SESSION['sid']==1433) echo $str;
while($row=$GLOBALS['le']->fetch_assoc()){
	$r[]=$row;
}
$str="select count(*) as nums from pft_d_operation_rec r left join pft_member m on r.fid=m.id $where";
$GLOBALS['le']->query($str);
$GLOBALS['le']->fetch_assoc();
$count=$GLOBALS['le']->f("nums");
$totaltnum=$GLOBALS['le']->f("totaltnum");
$dtypeT=array(0=>"下单",1=>"取消订单",2=>"订单验证",3=>"订单重发",4=>"订单修改",5=>"￥");
include("tpl/operatorRecord.tpl");
include("common/footer.html");?>